/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * VisualizarCampeonatos.java
 *
 * Created on 24/06/2011, 16:47:54
 */
package GUI.campeonato;

import bd.MySql;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import javax.swing.table.DefaultTableModel;
import util.Datas;
import util.MySqlTableModel;

/**
 *
 * @author Gabriel
 */
public class VisualizarCampeonatos extends javax.swing.JFrame {
    private int id_campeonato;

    /** Creates new form VisualizarCampeonatos */
    public VisualizarCampeonatos() {
        modelEscolas = new TableModelEscolas();
        initComponents();
        this.setLocationRelativeTo(null);

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPopupMenu1 = new javax.swing.JPopupMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jPopupMenu2 = new javax.swing.JPopupMenu();
        jMenuItem3 = new javax.swing.JMenuItem();
        jPanel1 = new javax.swing.JPanel();
        labelEstado = new javax.swing.JLabel();
        comboEstados = new javax.swing.JComboBox();
        labelAno = new javax.swing.JLabel();
        textAno = new javax.swing.JTextField();
        labelDataInicio = new javax.swing.JLabel();
        textDataInicioDia = new javax.swing.JTextField();
        labelDataFim = new javax.swing.JLabel();
        textDataFimDia = new javax.swing.JTextField();
        btAplicar = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        textDataInicioMes = new javax.swing.JTextField();
        textDataFimMes = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        textDataInicioAno = new javax.swing.JTextField();
        textDataFimAno = new javax.swing.JTextField();
        scrollResultados = new javax.swing.JScrollPane();
        tableResultados = new javax.swing.JTable();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();

        jMenuItem1.setText("Editar");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jPopupMenu1.add(jMenuItem1);

        jMenuItem2.setText("Excluir");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jPopupMenu1.add(jMenuItem2);

        jMenuItem3.setText("Excluir");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jPopupMenu2.add(jMenuItem3);

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Pesquisar Campeonatos");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosed(java.awt.event.WindowEvent evt) {
                formWindowClosed(evt);
            }
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Filtros"));

        labelEstado.setText("Estado:");

        comboEstados.setModel(new util.ComboBoxEstados(true));

        labelAno.setText("Ano:");

        textAno.setColumns(4);

        labelDataInicio.setText("Data Início:");

        textDataInicioDia.setColumns(2);

        labelDataFim.setText("Data Fim:");

        textDataFimDia.setColumns(2);

        btAplicar.setText("Aplicar");
        btAplicar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btAplicarActionPerformed(evt);
            }
        });

        jLabel1.setText("/");

        jLabel2.setText("/");

        textDataInicioMes.setColumns(2);

        textDataFimMes.setColumns(2);
        textDataFimMes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textDataFimMesActionPerformed(evt);
            }
        });

        jLabel3.setText("/");

        jLabel4.setText("/");

        textDataInicioAno.setColumns(4);

        textDataFimAno.setColumns(4);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelDataFim)
                    .addComponent(labelEstado)
                    .addComponent(labelAno)
                    .addComponent(labelDataInicio))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(textAno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboEstados, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(textDataInicioDia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(textDataInicioMes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(textDataInicioAno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(textDataFimDia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(textDataFimMes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(textDataFimAno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btAplicar)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelEstado)
                    .addComponent(comboEstados, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelAno)
                    .addComponent(textAno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelDataInicio)
                    .addComponent(textDataInicioDia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1)
                    .addComponent(textDataInicioMes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addComponent(textDataInicioAno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelDataFim)
                    .addComponent(textDataFimDia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btAplicar)
                    .addComponent(jLabel2)
                    .addComponent(textDataFimMes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4)
                    .addComponent(textDataFimAno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        scrollResultados.setBorder(javax.swing.BorderFactory.createTitledBorder("Campeonatos"));

        tableResultados.setModel(new TableModelCampeonatos("SELECT idCampeonato,estado,anoRealizacao,dataInicio,dataFim FROM campeonato_estadual "));
        tableResultados.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableResultadosMouseClicked(evt);
            }
        });
        scrollResultados.setViewportView(tableResultados);

        jScrollPane1.setBorder(javax.swing.BorderFactory.createTitledBorder("Escolas Participantes"));

        jTable1.setModel(modelEscolas);
        jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable1MouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(jTable1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 284, Short.MAX_VALUE)
                    .addComponent(scrollResultados, javax.swing.GroupLayout.DEFAULT_SIZE, 284, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(scrollResultados, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    // exibe informações da tabela campeonato_estadual de acordo com o filtro escolhido pelo usuário
    private void btAplicarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btAplicarActionPerformed
        // TODO add your handling code here:
        int and_count = 0;


        String query = "SELECT idCampeonato,estado,anoRealizacao,dataInicio,dataFim FROM campeonato_estadual ";

        // pega informação do filtro de estado
        if (!comboEstados.getSelectedItem().toString().equals("Todos")) {
            if (and_count == 0) {
                query = query + "WHERE estado = \"" + comboEstados.getSelectedItem().toString() + "\" ";
                and_count++;
            } else {
                query = query + "OR estado = \"" + comboEstados.getSelectedItem().toString() + "\" ";
            }
        }

        // pega informação do filtro de ano
        if (!textAno.getText().equals("")) {
            if (and_count == 0) {
                query = query + "WHERE anoRealizacao = " + textAno.getText() + " ";
                and_count++;
            } else {
                query = query + "OR anoRealizacao = " + textAno.getText() + " ";
            }
        }

        // pega informação do filtro de data de início
        if (!textDataInicioDia.getText().equals("") && !textDataInicioMes.getText().equals("") && !textDataInicioAno.getText().equals("")) {
            String dataInicio = Datas.JavaDateToMySQLDate(new Datas(Integer.valueOf(this.textDataInicioDia.getText()), Integer.valueOf(this.textDataInicioMes.getText()), Integer.valueOf(this.textDataInicioAno.getText())));

            if (and_count == 0) {
                query = query + "WHERE dataInicio = \"" + dataInicio + "\" ";
                and_count++;
            } else {
                query = query + "OR dataInicio = \"" + dataInicio + "\" ";
            }
        }

        // pega informação do filtro de data de fim
        if (!textDataFimDia.getText().equals("") && !textDataFimMes.getText().equals("") && !textDataFimAno.getText().equals("")) {
            String dataFim = Datas.JavaDateToMySQLDate(new Datas(Integer.valueOf(this.textDataFimAno.getText()), Integer.valueOf(this.textDataFimMes.getText()), Integer.valueOf(this.textDataFimDia.getText())));

            if (and_count == 0) {
                query = query + "WHERE dataFim = \"" + dataFim + "\" ";
                and_count++;
            } else {
                query = query + "OR dataFim = \"" + dataFim + "\" ";
            }
        }

        System.out.println(query);
        
        String colunas[] = {"ID","Estado","Ano","Data Início","Data Fim"};
        tableResultados.setModel(new MySqlTableModel(query, colunas));
        jTable1.setModel(new DefaultTableModel());

    }//GEN-LAST:event_btAplicarActionPerformed

    private void textDataFimMesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textDataFimMesActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_textDataFimMesActionPerformed

    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
        // TODO add your handling code here:
        this.setVisible(false);
    }//GEN-LAST:event_formWindowClosing

    private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_formWindowClosed

    private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable1MouseClicked
        // TODO add your handling code here:
        if(evt.getButton() == MouseEvent.BUTTON3) {
            jTable1.removeRowSelectionInterval(0, jTable1.getRowCount()-1);
            jTable1.addRowSelectionInterval(jTable1.rowAtPoint(evt.getPoint()), jTable1.rowAtPoint(evt.getPoint()));
            this.jPopupMenu2.show(jTable1, evt.getX(), evt.getY());
        }
    }//GEN-LAST:event_jTable1MouseClicked

    // método para exibir as escolas participantes de um campeonato quando este é selecionado
    private void tableResultadosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableResultadosMouseClicked
        // TODO add your handling code here:        

        if (evt.getButton() == MouseEvent.BUTTON1) {
            Object ObjectIdEscola = tableResultados.getValueAt(tableResultados.getSelectedRow(), 0);
            if (ObjectIdEscola != null) {
                int idCampeonato = Integer.valueOf(ObjectIdEscola.toString()); // pega o id do campeonato selecionado

                this.id_campeonato = idCampeonato;
                // pega os dados das escolas e exibe
                this.modelEscolas = new TableModelEscolas();
                this.jTable1.setModel(modelEscolas);
                MySql conn = new MySql(GUI.Main.config);

                String query = "SELECT escola.idEscola,escola.nomeCompleto FROM escola JOIN (SELECT idEscola FROM escola_participante WHERE idCampeonato=" + idCampeonato + ") as EscolaPart on EscolaPart.idEscola=escola.idEscola";
                System.out.println(query);
                ArrayList<ArrayList<String>> resultado = conn.getTable(query);

                for (int i = 0; i < resultado.size(); i++) {
                    String data[] = new String[resultado.get(i).size()];
                    for (int j = 0; j < resultado.get(i).size(); j++) {
                        data[j] = resultado.get(i).get(j);
                    }
                    modelEscolas.addData(data);
                }
            }
        } else if(evt.getButton() == MouseEvent.BUTTON3) {
            tableResultados.removeRowSelectionInterval(0, tableResultados.getRowCount()-1);
            tableResultados.addRowSelectionInterval(tableResultados.rowAtPoint(evt.getPoint()), tableResultados.rowAtPoint(evt.getPoint()));
            this.jPopupMenu1.show(tableResultados, evt.getX(), evt.getY());
        }
    }//GEN-LAST:event_tableResultadosMouseClicked

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
        String id = tableResultados.getValueAt(tableResultados.getSelectedRow(), 0).toString();

        String query = "DELETE FROM campeonato_estadual WHERE idCampeonato=" + id;

        System.out.println(query);

        MySql conn = new MySql(GUI.Main.config);

        conn.insert(query);
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        String id = tableResultados.getValueAt(tableResultados.getSelectedRow(), 0).toString();

        new CadastroCampeonatoEstadual(id).setVisible(true);
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
        String id = jTable1.getValueAt(jTable1.getSelectedRow(), 0).toString();

        String query = "DELETE FROM escola_participante WHERE idEscola=" + id + " AND idCampeonato=" + this.id_campeonato;

        System.out.println(query);

        MySql conn = new MySql(GUI.Main.config);

        conn.insert(query);
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    // classe para exibir os dados das escolas em uma tabela na tela
    private class TableModelEscolas extends DefaultTableModel {

        public TableModelEscolas() {
            this.addColumn("ID");
            this.addColumn("Nome");
        }

        public void addData(String[] data) {
            this.addRow(data);
        }
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new VisualizarCampeonatos().setVisible(true);
            }
        });
    }

    // classe para exibir os dados dos campeonatos em uma tabela na tela
    private class TableModelCampeonatos extends DefaultTableModel {

        public TableModelCampeonatos(String query) {
            MySql conn = new MySql(GUI.Main.config);

            /* Construindo colunas */
            this.addColumn("ID");
            this.addColumn("Estado");
            this.addColumn("Ano");
            this.addColumn("Data Início");
            this.addColumn("Data Fim");

            ArrayList<ArrayList<String>> resultado = conn.getTable(query);
            for (int i = 0; i < resultado.size(); i++) {
                String rowData[] = new String[resultado.get(i).size()];
                for (int j = 0; j < resultado.get(0).size(); j++) {
                    rowData[j] = resultado.get(i).get(j);
                }
                this.addRow(rowData);
            }
        }
    }
    TableModelEscolas modelEscolas;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btAplicar;
    private javax.swing.JComboBox comboEstados;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPopupMenu jPopupMenu1;
    private javax.swing.JPopupMenu jPopupMenu2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JLabel labelAno;
    private javax.swing.JLabel labelDataFim;
    private javax.swing.JLabel labelDataInicio;
    private javax.swing.JLabel labelEstado;
    private javax.swing.JScrollPane scrollResultados;
    private javax.swing.JTable tableResultados;
    private javax.swing.JTextField textAno;
    private javax.swing.JTextField textDataFimAno;
    private javax.swing.JTextField textDataFimDia;
    private javax.swing.JTextField textDataFimMes;
    private javax.swing.JTextField textDataInicioAno;
    private javax.swing.JTextField textDataInicioDia;
    private javax.swing.JTextField textDataInicioMes;
    // End of variables declaration//GEN-END:variables
}
